package org.dataframework.security.core.db;

import java.sql.SQLException;
import java.util.List;

/**
 * @Author: LiuCf
 * @Email: 1316640406@qq.com
 * @Date: 2021/7/3 12:58
 */
public interface JdbcTemplate {
    /**
     *
     * @param sql
     * @param clazz
     * @param rowMapper
     * @param <T>
     * @return
     */
    <T> T select(String sql, Class<T> clazz, RowMapper<T> rowMapper) throws SQLException;

    /**
     *
     * @param sql
     * @param clazz
     * @param rowMapper
     * @return
     */
    <T> List<T> selectAll(String sql, Class<T> clazz, RowMapper<T> rowMapper) throws SQLException;

}
